package com.main.java;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.generico.dto.ctg.CtgCatalogo;


@Entity
@Table(name = "inventario")
public class Inventario implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "inventario_id", nullable = false)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "IdGenerator")
	@SequenceGenerator(allocationSize = 1, name = "IdGenerator", sequenceName = "inventario_id_seq")
	private Long inventariId;
	
	@Column(name = "cantidad")
	private String inventarioCantidad;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ctg_materia_prima_id")
	private CtgCatalogo ctgMateriaPrimaId;

	public Long getInventariId() {
		return inventariId;
	}

	public void setInventariId(Long inventariId) {
		this.inventariId = inventariId;
	}

	public String getInventarioCantidad() {
		return inventarioCantidad;
	}

	public void setInventarioCantidad(String inventarioCantidad) {
		this.inventarioCantidad = inventarioCantidad;
	}

	public CtgCatalogo getCtgMateriaPrimaId() {
		return ctgMateriaPrimaId;
	}

	public void setCtgMateriaPrimaId(CtgCatalogo ctgMateriaPrimaId) {
		this.ctgMateriaPrimaId = ctgMateriaPrimaId;
	}

}
